/*
 * @Author: sichuntian sichuntian@smartmappingtek.com
 * @Date: 2023-11-13 14:50:56
 * @LastEditors: sichuntian sichuntian@smartmappingtek.com
 * @LastEditTime: 2024-02-18 18:20:04
 * @Description:
 *
 */
const MAP_MODE = {
  NORMAL: 0, // 常规模式
  EDIT: 1, // 测量模式
  VIEW: 2, // 测量模式
  BOARD: 3, //标绘模式
};

let mapMode = MAP_MODE.NORMAL; // 默认常规模式

function setMapMode(mode) {
  switch (mode) {
    case 0:
      mapMode = MAP_MODE.NORMAL;
      break;
    case 1:
      mapMode = MAP_MODE.EDIT;
      break;
    case 2:
      mapMode = MAP_MODE.VIEW;
      break;
    case 3:
      mapMode = MAP_MODE.BOARD;
      break;
    default:
      console.error("默认提示");
  }
  return mapMode;
}

function getMapMode() {
  return mapMode;
}

export { MAP_MODE, setMapMode, getMapMode };
